#pragma once

#include <assert.h>
#include <math.h>

////////////////////////////////////////////////////
#define verify(expr)		assert(expr)
#define NODEFAULT			assert(false)

////////////////////////////////////////////////////
typedef double				fp64;
typedef float				fp32;
typedef unsigned long long	u64; 
typedef unsigned int		u32;
typedef unsigned short int	u16;
typedef unsigned char		u8;
typedef long long			s64;
typedef int					s32;
typedef short int			s16;
typedef char				s8;

////////////////////////////////////////////////////
#define EPS_1				0.1f
#define EPS_2				0.01f
#define EPS_3				0.001f
#define EPS_4				0.0001f
#define EPS_5				0.00001f

////////////////////////////////////////////////////
#define PI					(3.141592653589793f)
#define TO_RADIAN(x)		(fp32)((x) * PI / 180.f)
#define TO_DEGREES(x)		(fp32)((x) * 180.f / PI)

////////////////////////////////////////////////////
#define BASE_WIDTH			800
#define BASE_HEIGHT			600
#define BASE_FOV			50.f
#define BASE_NEAR_PLANE		1.f
#define BASE_FAR_PLANE		100.f

////////////////////////////////////////////////////
struct PerspectiveParams	{
	PerspectiveParams		() : width(BASE_WIDTH), height(BASE_HEIGHT), near_v(BASE_NEAR_PLANE), far_v(BASE_FAR_PLANE), fov(BASE_FOV) {}
	fp32					width;
	fp32					height;
	fp32					near_v;
	fp32					far_v;
	fp32					fov;
};
////////////////////////////////////////////////////
#define STEP				0.1f

////////////////////////////////////////////////////